//
//  StardictDict.h
//  Words2
//
//  Created by Mathieu Tozer on 27/09/06.
//  Copyright 2006 __MyCompanyName__. All rights reserved.
//

#define MDICT_MDICT @"MDict"
#define MDICT_TRANSLATOR @"MDict_translator"

#define MDICT_TOPMOSTLEVEL NSModalPanelWindowLevel
#define MDICT_OPACITYLEVEL 0.3f

#define MDICT_FNAME @"MDict_fname"
#define MDICT_DIR @"MDict_dir"

#define MDICT_HISTORYEXTENSION @"txt"

#define MDICT_TOOLBARALPHA 0.8f

// from toolbar
#define MDICT_ACTION_SHOW_PREFS 1
// from prefs
#define MDICT_ACTION_RELAUNCH 1

#define MDICT_SUGGESTIONS_CHARS 3
#define MDICT_MAX_WORD_LEN 100

#define MDICT_FONT_SIZE @"MDict_fontSize"
#define MDICT_MIN_FONTSIZE 9
#define MDICT_MAX_FONTSIZE 25
#define MDICT_FONTSIZE_LEN (MDICT_MAX_FONTSIZE-MDICT_MIN_FONTSIZE)
#define MDICT_DEFAULT_FONT_SIZE 12

#define MDICT_HTML_MIN_SCALE 0.8
#define MDICT_HTML_MAX_SCALE 2.8
#define MDICT_HTML_SCALE_LEN (MDICT_HTML_MAX_SCALE-MDICT_HTML_MIN_SCALE)

#define DELIMETER '\t'
// for backward compat.
#define DELIMETER2 ','
#define DELIMETER3 ';'

// default hotkey: cmd-opt-space
#define MDICT_HKEY @"MDict_hkey"
// space
#define MDICT_HKEY_DEFAULT 49
#define MDICT_HKEY_MODIFIERS @"MDict_hkey_modifiers"
#define MDICT_HKEY_MODIFIERS_DEFAULT (cmdKey+optionKey)

#define MDICT_INSTALL_DICTS_MENU_TAG 1

#import <Cocoa/Cocoa.h>
#import "DictionaryMO.h"

@interface StardictDict : DictionaryMO < NSCoding > {
	
}

#pragma mark Archive Support
- (void)encodeWithCoder:(NSCoder *)coder;
- (id)initWithCoder:(NSCoder *)coder;

	//methods subclasses must override
//- (NSArray *)arrayOfDefinitions:(NSString *)word;
- (NSMutableString *)stringBlobOfDefinitions:(NSString *)word;
- (NetworkConnectionMonitor *)networkConnectionMonitor; //actually this type of dict doesn't need a connectionMonitor
- (void)createConnectionMonitor; //so we'll noop it.

-(void)connect; //noop
-(void)disconnect; //noop
-(bool)isAvailable;
-(bool)isRemote;
-(NSString *)dictType;

-(NSString*)webColor:(NSColor*)aColor;


@end
